import request from '../../../public/utils/request';

export default {
    /**
     * 报销单列表
     * @param {Object} data
     * @returns {Promise}
     */
    getReimbursementList(data) {
        return request('/nccloud/erm/expenseaccount/CostShareBXListQueryAction.do', { data });
    },
    /**
     * 结转单列表
     * @param {Object} data
     * @returns {Promise}
     */
    getCostShareList(data) {
        return request('/nccloud/erm/expenseaccount/CostShareListQueryAction.do', { data });
    },
    /**
     * 根据报销单查询新建结转单数据
     * @param {Object} data
     * @returns {Promise}
     */
    getDetailByReimbursement(data) {
        return request('/nccloud/erm/expenseaccount/CostShareAddAction.do', { data });
    },
    /**
     * 根据pk查询结转单数据
     * @param {Object} data
     * @returns {Promise}
     */
    getDetailByPk(data) {
        return request('/nccloud/erm/expenseaccount/CostShareViewAction.do', { data });
    },
    /**
     * 删除结转单
     * @param {Object} data
     * @returns {Promise}
     */
    deleteCostShare(data) {
        return request('/nccloud/erm/expenseaccount/CostShareDeleteAction.do', { data });
    },
    /**
     * 保存结转单
     * @param {Object} data
     * @returns {Promise}
     */
    saveCostShare(data) {
        return request('/nccloud/erm/expenseaccount/CostShareSaveAction.do', { data });
    },
    /**
     * 暂存结转单
     * @param {Object} data
     * @returns {Promise}
     */
    saveCostShareTemporarily(data) {
        return request('/nccloud/erm/expenseaccount/CostShareTempSaveAction.do', { data });
    },
    /**
     * 联查报销单
     * @param {Object} data
     * @returns {Promise}
     */
    getReimbursementByLink(data) {
        return request('/nccloud/sscrp/rpbill/BrowseBillAction.do', { data });
    },
    /**
     * 联查凭证
     * @param {Object} data
     * @returns {Promise}
     */
    getVoucherByLink(data) {
        return request('/nccloud/erm/expenseaccount/CostShareLinkVoucherAction.do', { data });
    },
    /**
     * 联查预算
     * @param {Object} data
     * @returns {Promise}
     */
    getBudgetByLink(data) {
        return request('/nccloud/erm/expenseaccount/CostShareLinkBudgetAction.do', { data });
    },
    /**
     * 审批结转单
     * @param {Object} data
     * @returns {Promise}
     */
    approveCostShare(data) {
        return request('/nccloud/erm/expenseaccount/CostShareApproveAction.do', { data });
    },
    /**
     * 取消审批结转单
     * @param {Object} data
     * @returns {Promise}
     */
    cancelApprovalCostShare(data) {
        return request('/nccloud/erm/expenseaccount/CostShareUnApproveAction.do', { data });
    },
    /**
     * 获取用户信息
     * @param {Object} data
     * @returns {Promise}
     */
    getUserInfo(data = {}) {
        return request('/nccloud/erm/expenseaccount/QueryUserInfoAction.do', { data });
    },
    /**
     * 编辑后事件
     * @param {Object} data 
     * @returns {Promise}
     */
    valueChange(data = {}) {
        return request('/nccloud/erm/expenseaccount/CostShareValueChangeAction.do', { data });
    }
};
